<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"

      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html">



    <body>

        <ui:composition template="./../../WEB-INF/templates/Template.xhtml">
            <ui:define name="content">
                <div class= "body-content" >
                    <div class ="right-cont">   
                        <c:set var="list" value= "${admin_MemberController.listThanhVien}"/>
                        <div id="contented">
                            <div class="bg_account_T">
                                Quản Lý Thành Viên
                            </div>
                            <div class="box-profile">
                                <fieldset>
                                    <legend>Thông Tin Thành Viên</legend>
                                    <h:form >
                                        <h:commandButton value="Insert" action="insert" />

                                    </h:form>

                                    <br /><br />
                                    <div class ="middle-box">
                                       
                                            <table  >
                                                <tr>

                                                    <td style="vertical-align: bottom;">
                                                        <span class="style1">Page <b>1</b> / 1			| Display
                                                            <select name="pagination"><option value="20">20</option><option value="50" selected="selected">50</option><option value="100">100</option><option value="300">300</option>
                                                            </select>
                                                            / 3 result(s)
                                                        </span>
                                                         <h:form >
                                                        <span style="float: right;">
                                                            <div class="field">	  

                                                                <input name="searchstring" value="#{admin_MemberController.search}"/>
                                                                <h:commandButton  value="Tìm" action="#{admin_MemberController.SearchMember()}"  />

                                                            </div>
                                                        </span>
                                                         </h:form>
                                                        <span class="clear"></span>
                                                    </td>

                                                </tr>
                                                <tr>
                                                    <td height="74">

                                                        <table class="table" cellpadding="0" cellspacing="0">
                                                            <thead>
                                                                <tr>

                                                                    <th>Username</th>
                                                                    <th>Họ Tên</th>
                                                                    <th>Ngày Sinh</th>
                                                                    <th>Email</th>
                                                                    <th>Action</th>

                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                                <c:forEach items ="${list}" var ="member">
                                                                    <tr>
                                                                        <h:form>
                                                                            <input type="hidden" name="txtUsername" value="#{member.username}"/>
                                                                            <td><label >#{member.username}</label></td>
                                                                            <td><label name="txtHoTen">#{member.nguoidung.hoten}</label></td>
                                                                            <td><label name="txtNgaySinh">#{member.nguoidung.ngaysinh}</label></td>
                                                                            <td><label name="txtEmail">#{member.nguoidung.email}</label></td>
                                                                            <td>
                                                                                <h:commandButton  value ="Delete" action="#{admin_MemberController.getMemberDelete()}" />
                                                                                <h:commandButton  value ="Update" action="#{admin_MemberController.getMemberUpdate()}"/>

                                                                            </td>

                                                                        </h:form>
                                                                    </tr>
                                                                </c:forEach>
                                                            </tbody>
                                                        </table>
                                                        <form action="AdminController.do">
                                                            <input type="submit" value ="CreateReport" name="action"/>
                                                        </form>
                                                    </td>
                                                </tr>
                                            </table>
                                        
                                    </div>
                                </fieldset>
                            </div>
                        </div>
                    </div>
                </div>
            </ui:define>
        </ui:composition>

    </body>
</html>
